//
//  MenuCellCollectionViewCell.m
//  Food
//
//  Created by dlios on 15-7-15.
//  Copyright (c) 2015年 李志远. All rights reserved.
//

#import "MenuCellCollectionViewCell.h"
#import "BaseHeader.h"

@implementation MenuCellCollectionViewCell
- (void)dealloc
{
    [_clasifyLabel release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.clasifyLabel = [[UILabel alloc] init];
        self.clasifyLabel.layer.borderWidth = 1;
        self.clasifyLabel.layer.cornerRadius = 12;
        self.clasifyLabel.font = [UIFont systemFontOfSize:15];
        self.clasifyLabel.textAlignment = NSTextAlignmentCenter;
        
        [self.contentView addSubview:self.clasifyLabel];
        
        [_clasifyLabel release];
    }
    
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    [super applyLayoutAttributes:layoutAttributes];
    
    self.clasifyLabel.frame = CGRectMake(0, 0, CollectionWidth, CollectionHeight);
}

@end
